package cc.zy.base.hr.mapper;


import cc.zy.base.hr.entity.DraftPlan;

import cc.zy.base.system.entity.Dept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 计划草稿
 * mapper
 */
public interface DraftPlanMapper extends BaseMapper<DraftPlan> {



    /**
     * 查找计划草稿详细信息
     *
     * @param page    分页对象
     * @param draftPlan 用户对象，用于传递查询条件
     * @return Ipage
     */
    <T> IPage<DraftPlan> findDraftPlanDetailPage(Page<T> page, @Param("draftPlan") DraftPlan draftPlan);

    Integer countDraftPlanDetail(@Param("draftPlan") DraftPlan draftPlan);

    /**
     * 通过ID查找计划草稿
     *
     * @return 计划草稿
     */
    DraftPlan findById(Integer draftPlanId);

    /**
     * 查找计划草稿详细信息
     *
     * @param draftPlan 计划草稿对象，用于传递查询条件
     * @return List<DraftPlan>
     */
    List<DraftPlan> findDraftPlanDetail(@Param("draftPlan") DraftPlan draftPlan);

    /**
     * 查询不带分页
     */
    List<DraftPlan> findDraftPlanListNotPage(@Param("draftPlan") DraftPlan draftPlan);

    /**
     *
     * @param trainningTitle
     * @return
     */
    List<DraftPlan> isRepetitive(@Param("trainningTitle") String trainningTitle);





}
